package com.net.xpay.core.manager.safePay;

import com.net.common.manager.VersionedManager;
import com.net.xpay.core.domain.safePay.SafePayOrder;
import com.net.xpay.core.enums.SafePayOrderStatus;
import com.net.xpay.core.model.SafePayOrderSearchModel;

import java.time.LocalDateTime;
import java.util.List;


public interface SafePayOrderManager extends VersionedManager<Long,SafePayOrder> {
    int batchSave(List<SafePayOrder> safePayOrders);

    int updateStatusByBatchId(Long userId, Long batchId, SafePayOrderStatus status, Boolean free, LocalDateTime endTime);

    List<SafePayOrder> listByBatchId(Long userId, Long batchId);

    List<SafePayOrder> search(SafePayOrderSearchModel searchModel);

    long searchCount(SafePayOrderSearchModel searchModel);

    List<SafePayOrder> list(SafePayOrderSearchModel searchModel);

    List<Long> listIds(SafePayOrderSearchModel searchModel);

    SafePayOrder findById(Long userId, Long id);

    SafePayOrder findByImportBizNo(Long userId, String importBatchNo, String importBizNo);

    /**
     *统计单笔超500元笔数
     */
    long statSingleVeryCount(LocalDateTime minEndTime, LocalDateTime maxEndTime, SafePayOrderStatus status);
    /**
     *统计用户单笔超500元笔数
     */
    long statUserSingleVeryCount(Long userId, LocalDateTime minEndTime, LocalDateTime maxEndTime, SafePayOrderStatus status);
    /**
     *统计付款支付宝
     */
    long statSafePayTransPayeeAlipayAccount(LocalDateTime minEndTime, LocalDateTime maxEndTime);
    /**
     *统计用户单笔超10000元笔数
     */
    long statUserLargeCount(Long userId, LocalDateTime minEndTime, LocalDateTime maxEndTime, SafePayOrderStatus status);
}
